<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>服装首页</title>
    <%--静态包含base标签，css，jQuery文件，--%>
    <%@include file="/view/common/head.jsp"%>

    <style>
        .clothes_cond{
            position: relative;
        }
        select,option{
            font-size:18px;
        }
        ul{
            position:absolute;
            top: 0px;
            left:80px;

        }
        ul li{
            display:none;
        }
    </style>
    <script type="text/javascript">
        $(function(){
            $("select").change(function(){
                // alert(1212);
                let val = $(this).val();
                alert(val);
                $("ul li").hide();
                $("ul li").eq(val).show();
            })
        })
    </script>
</head>
<body>

<div id="header">
    <%@include file="/view/common/back.jsp"%>
    <span class="wel_word">前台</span>
    <div>
        <a href="manage/clothesServlet?action=getClotheslist">后台管理</a>
    </div>
</div>
<div id="main">
    <div id="clothes">
        <div class="clothes_cond">
            <select>
                <option value="0">衣服：</option>
                <option value="1">类别：</option>
                <option value="2">价格：</option>
            </select>
                <ul>
                    <li style="display:inline-block">
                        <form action="client/clothesServlet" method="get">
                            <input type="hidden" name="action" value="pageByName">
                            <input id="name" type="text" name="name">
                            <input type="submit" value="查询" />
                        </form>
                    </li>
                    <li>
                        <form action="client/clothesServlet" method="get">
                            <input type="hidden" name="action" value="pageByKind">
                            <input id="kind" type="text" name="kind">
                            <input type="submit" value="查询" />
                        </form>
                    </li>
                    <li>
                        <form action="client/clothesServlet" method="get">
                            <input type="hidden" name="action" value="pageByPrice">
                            <input id="min" type="text" name="min" value="${param.min}"> 元 -
                            <input id="max" type="text" name="max" value="${param.max}"> 元
                            <input type="submit" value="查询" />
                        </form>
                    </li>
                </ul>

        </div>
        <div style="text-align: center">
            <div style="height:35px;">
            </div>
        </div>
        <c:forEach items="${requestScope.page.items}" var="clothes">

        <div class="b_list">
            <div class="img_div">
                <img class="clothes_img" alt="" src="${clothes.imgPath}" />
            </div>
            <div class="clothes_info">
                <div class="clothes_name">
                    <span class="sp1">衣服:</span>
                    <span class="sp2">${clothes.name}</span>
                </div>
                <div class="clothes_kind">
                    <span class="sp1">类别:</span>
                    <span class="sp2">${clothes.kind}</span>
                </div>
                <div class="clothes_price">
                    <span class="sp1">价格:</span>
                    <span class="sp2">￥${clothes.price}</span>
                </div>
                <div class="clothes_sales">
                    <span class="sp1">销量:</span>
                    <span class="sp2">${clothes.sales}</span>
                </div>
                <div class="clothes_amount">
                    <span class="sp1">库存:</span>
                    <span class="sp2">${clothes.stock}</span>
                </div>
            </div>
        </div>
        </c:forEach>

    </div>

</div>

<%@include file="/view/common/page_nav.jsp"%>
<%@include file="/view/common/footer.jsp"%>
</body>
</html>
